﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Diagnostics;
using System.Drawing;
using System.Drawing.Drawing2D;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace TEL.TelPhoneF.Controls
{
    public partial class ButtonCheckOption : ButtonOption
    {
        public ButtonCheckOption()
        {
            InitializeComponent();
            SetStyle(ControlStyles.Selectable, false);
            this.Paint += new PaintEventHandler(ButtonOption_Paint);
        }

       public ButtonCheckOption(IContainer container)
        {
            container.Add(this);

            InitializeComponent();
            this.Paint += new PaintEventHandler(ButtonOption_Paint);
        }

        private bool _State = false;
        private Color m_ColorOn = Form1.BlueSkinColor;
        public Color ColorOn
        {
            get { return m_ColorOn; }
            set { m_ColorOn = value; }
        }
        private Color m_ColorOff = Color.White;
        public Color ColorOff
        {
            get { return m_ColorOff; }
            set { m_ColorOff = value; }
        }

    //    public Color ColorView { get; private set; }
        public bool State
        {
            get { return _State; }
            set
            {
                _State = value;
                ColorView = _State ? m_ColorOn : m_ColorOff;
                ForeColor = _State ? m_ColorOn : m_ColorOff;
                Invalidate();
            }
        }
    }
}
